package leetcodecompetition.S119;

/**
 * @Author: Siantar
 * @Date: 2023-12-09-22:31
 * @Description: 1.0
 */
public class T100130 {
    public int[] findIntersectionValues(int[] nums1, int[] nums2) {
        int r1 = 0, r2 = 0;
        for (int num : nums1) {
            if (f(num, nums2)) r1++;
        }
        for (int num : nums2) {
            if (f(num, nums1)) r2++;
        }
        return new int[]{r1, r2};
    }

    public boolean f(int t, int[] nums) {
        for (int num : nums) {
            if (t == num) return true;
        }
        return false;
    }
}
